package db

import "encoding/base64"

const encodeTable = "efghijklmnopqrstuvwxyz01ABCDEFGHIJKLMNOPQRSTUVWXYZabcd23456789+/"

var encoding = base64.NewEncoding(encodeTable)

func Encode(str string) string {
	return encoding.EncodeToString([]byte(str))
}

func Decode(str string) string {
	bts, _ := encoding.DecodeString(str)
	return string(bts)
}
